home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / hardware-part1 / 8158 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  35.9 KB

  1. Path: news.vol.it!news
  2. From: bizzetti@mbox.vol.it (Fabio Bizzetti)
  3. Newsgroups: comp.sys.amiga.hardware
  4. Subject: AgaEXTENDER: A device to allow fast 24bit gfx on AGA
  5. Date: 22 Mar 1996 23:19:46 GMT
  6. Organization: Video On Line
  7. Distribution: world
  8. Message-ID: <36453.6656T17T1818@mbox.vol.it>
  9. NNTP-Posting-Host: molcl5.vol.it
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  
  13.  
  14.  
  15. Subject:  AgaEXTENDER.
  16.  
  17. Author:
  18.  Fabio Bizzetti, via Fra' Giarratana 62/c, 93100 Caltanissetta, Italy
  19.  fax/voice: +39 934 27220 / email: bizzetti@mbox.vol.it
  20.  
  21. (c) copyright 1996 by Fabio Bizzetti. All rights reserved.
  22.  
  23.  
  24. The aim of this project is to improve drastically the performances of AGA
  25. Amigas (possibly also OCS/ECS), extended to both future and old Amigas,
  26. with the minimum efforts possible, both commercial and technological.
  27.  
  28. The Amiga is losing day after day the rest of its small market due to its
  29. limited hardware, and although faster CPU's can be mounted, the video/audio
  30. hardware cannot be improved in a cheap way to make it "popular".
  31. Nowadays the competition is MultiMedia, and the Amiga needs a revolution,
  32. but creating a new machine would still not resolv the problem, having millions
  33. of already installed machines that cannot and must not become obsolete.
  34. Both Graffiti and AGX don't help much, they only emulate a VGA's ModeX style
  35. screen, that requires manipulation both in VGA and Graffiti/AGX Amiga, but in
  36. this case we've a so poor bandwidth that makes all efforts at the end useless.
  37.  
  38. We're in front of a bad problem, the CPU->AGA bandwidth is very poor when it
  39. comes to complex or "chunky graphics" based applications, but we can't release
  40. an AGA+ for many reasons:
  41. # It would cost too much at the moment, and would also require too much time
  42.   to be developed, therefore it would probably not be that big improvement
  43.   proportionally to the efforts to make it.
  44. # All the previous A1200/A4000/CD32 would be cut off, or anyway I don't believe
  45.   that many old users would mass-upgrade changing Lisa or the whole chipset.
  46. # We've to keep the compatibility with older Amigas, this is indispensable,
  47.   and is part of the Amiga "philosophy". The Amiga users consider the fact that
  48.   most of the Amiga software run also on older Amigas, more than it happens
  49.   in the PC world, as of vital importance, more than absolute performances.
  50.  
  51. But we *need* to drastically improve the situation, it's more serious than it
  52. seems. My fears are that the Amiga loses all its already small commercial
  53. market and become supported only by PD/ShareWare. It means an hobbyst computer,
  54. and I like it a lot, but we also need high quality software (meaning hard work
  55. behind it) that means commercial software.
  56.  
  57. Games and expecially MultiMedia/Productivity software are decisively important
  58. to avoid the death of the Amiga and, more, make it again better than others.
  59.  
  60. Also mounting the fastest PowerPC card will not improve some serious lacks of
  61. the audio/video architecture of the A1200, that doesn't deserve to become
  62. obsolete when and if a new chipset will be released (perhaps not installable
  63. in the old A1200s).
  64.  
  65. The solution exists, and it's optimal both technically and commercially, thus
  66. Amiga Technologies should consider it carefully in my opinion.
  67.  
  68. A custom chip nowadays can be made, and if it's really worth it should be made.
  69. Commodore made Akiko, and other interface chips, but no-one of them is
  70. comparable to this in terms of real performances-gaining (about audio/video).
  71. Nowadays technology allows the making of such a custom chip easily, although
  72. it's more complex than Denise/Lisa, the technology of 1996 should surely allow
  73. the making of the AgaEXTENDER.
  74. Many custom chips produced today (on other platforms) are much more complex
  75. than this one, that here is presented in an advanced version that could be
  76. reduced as needed, in case resources don't allow a full implementation.
  77.  
  78. I consider myself an expert of the Amiga architecture, an appassionate of
  79. hardware and a skilled and original coder. This is the project I designed:
  80.  
  81. The AgaEXTENDER is a device to plug-in the RGB port of old Amigas, and to be
  82. integrated in the motherboard of future Amigas. It is based on a line-buffer
  83. device, much cheaper than frame-buffer.
  84.  
  85. The whole AgaEXTENDER's work-cycle is based on a horizontal line, starting
  86. from an Horizontal Synch and temporized via both the PixelClock output and
  87. the 28Mhz clock (doubled internally to 56Mhz) for other purphoses.
  88.  
  89. A brief description of its features and performances:
  90.  
  91. # ChipMem->RGBport bandwidth of more than 22Mb/sec allowing i.e. such modes:
  92. a) 24 bit (R,G,B byte based or 3 byteplanes) up to about 512*290 in PAL/DBLPAL
  93.    or 512*580 PAL interlaced (with or without overscan).
  94. b) 24 bit (A,R,G,B longword based) up to 384*290 in PAL/DBLPAL or 384*580 PAL
  95.    interlaced (with or without overscan), becoming 768*580 with hardware
  96.    antialiasing enabled (linear interpolation).
  97. c) 15 bit (word based) resolution up to 1024*290 in PAL/DBLPAL or 512*580 PAL
  98.    interlaced (with or without overscan).
  99. d) YUV (8+8+8 byteplanes based) resolution up to about 512*290 in PAL/DBLPAL
  100.    or 512*580 PAL interlaced (with or without overscan).
  101. e) YUV (6+5+5 word based) resolution up to 1024*290 in PAL/DBLPAL or 1024*580
  102.    PAL interlaced, or 512*580 DBLPAL (with or without overscan).
  103. f) 8 bit (classic chunky mode) resolution up to 512*290 with 4 PlayFields.
  104. f) 16 bit (YUV or RGB chunky mode) resolution up to 256*290 with 4 PlayFields.
  105. g) 8 bit chunky mode for OS, resolution 768*600 31Khz 50Hz
  106. Scale (Zoom) effects on the playfields. Full hardware smooth scroll support.
  107. Many other video modes, completely programmable by skilled coders.
  108. # Full OS support (draggable screens and AGAnormal/AGAextended together).
  109. # Hardware completely programmable via 256 registers.
  110. # HiRes-copper, for advanced effects/modes.
  111. # Antialiasing both horizontal and vertical. Fully programmable pixel rate.
  112. # Support for fast MPEG/JPEG display, due to built in YUV conversion and more.
  113. # 16bit 3D audio, extremely high playback rate, 4+4+4+4 (or more) channels.
  114. # Deinterlacer. No bandwidth waste (unlike scan doubled DBLPAL/DBLNTSC).
  115. # Extremely fast transparency effects.
  116.  
  117.  
  118. The device can be described as made of 3 principal parts:
  119.  
  120.  1ST STAGE: (FETCH)
  121.  2ND STAGE: (AUDIO/VIDEO PROCESSING)
  122.  3RD STAGE: (OUTPUT)
  123.  
  124. ###############################################################################
  125.  
  126.  1ST STAGE: Fetch   (Watch diagrams-picture STAGE1_Fetch.IFF)
  127.  
  128.  
  129. NOTE: the genlock audio bit freezes/allows the operations of this stage.
  130.  
  131. The function of this stage is basically to fetch more data possible from Lisa,
  132. and to sort and store it into the internal line-buffers of the AgaEXTENDER.
  133.  
  134. To achieve full bandwidth usage, there are 3 samplers connected to the
  135. analog RGB output. Resolution is 3+3+2 bits ( 3 red + 3 green + 2 blue ).
  136. This choice is optimal because we could switch back to normal Amiga
  137. screen at any moment, and not having time to load 256 color registers,
  138. we get the best generic color palette limiting the resolution of one of
  139. the 3 primary colors. Logic would suggest blue because it has the smallest
  140. contribution to the brightness sensation, also if human vision has a good
  141. colour discrimination capability in blue colors.
  142.  
  143. Thus we have this input from analog RGB, that will be directly converted back
  144. into the 1..8 originary Lisa bitplanes data with no problems, providing we
  145. set-up a special 256 palette in Lisa's color registers. This allows us to
  146. have upto 8 independent extremely versatile DMA channels. There's always the
  147. advice to use 32bit-wide and FastPage modes. The transfer rate is selected
  148. by the pixelclock frequency selected in BPLCON0 (140/70/35 ns).
  149.  
  150. For each of these 8 serial streams (coming directly from each AGA bitplane)
  151. there's a shifter to delay of 0..63 bits the stream, then there's a register
  152. that contains the bitlenght of the chunky cell from memory, and a bit-based
  153. mask that filters eventual undesidered bits in the stream, in a continue cycle.
  154. If active this circuit will waste some bandwidth, but it is very useful to
  155. speed up CPU work when there's the need of fixed point math, i.e. in special
  156. fading effects.
  157.  
  158. Examples:
  159. 1)  bitlenght=8, filtermask=%11111111
  160.     byte based: no wasted bits.
  161. 2)  bitlenght=16, filtermask=%1111111100000000
  162.     word based: upper 8 bits used, last 8 bits wasted for fixed point support.
  163.  
  164. NOTE: the mask is 80bit long, although only -bitlenght- least significant ones
  165. are used.
  166.  
  167. So, although this means to waste ChipMem->RGB bandwidth, the global computer
  168. gfx performances will be heavily improved when this possibility is used to
  169. speed up routines needing low bits for fixed point.
  170.  
  171. The implementation is simply a circuit that checks the mask register, and
  172. provides or not a clock signal at its exit, to filter or not the bitdata.
  173.  
  174. At the exit of this bits filter, a 80bit register is checked to distribute
  175. the stream into the 8+8bit HiRes copper registers and/or one 64bit cell of a
  176. line-buffer and thus allow a large number of chunky modes and color resolution.
  177. NOTE: there're 4 line-buffers; the output will be destinated to one or unlikely
  178. more of them (for special FX involving more playfields), and 4 audio-buffers
  179. (that will be explained after).
  180.  
  181. Whenever all the 8+8bits of the special HiRes copper instruction register are
  182. filled, their contents are utilized (8bits to address an internal register and
  183. 8 bits of immediate data) and an internal AgaEXTENDER's register is written.
  184. The HiRes copper is a SIC (single instruction computer). For its nature,
  185. more channels can be used to fill its 8+8bits instruction register, thus
  186. allowing more bandwidth for the HiRes copper when necessary/useful.
  187. The 8+8bits instruction register is represented by the 16 upper bits of the
  188. distributor register, while the lower 64bits represent the line-buffer.
  189.  
  190. EXAMPLE:
  191.  
  192. ...distributor register...
  193. <-----------------------------------80 bits------------------------------------>
  194.                 <---------------------------64 bits---------------------------->
  195. AAAAAAAADDDDDDDDZZZZZZZZIIIIIIIIHHHHHHHHLLLLLLLLaaaaaaaaRRRRRRRRGGGGGGGGBBBBBBBB
  196. 00000000000000000000000000000000000000000000000000000000111110001111100011111000
  197.  
  198. (A=Address, D=ImmediateData) for HiRes copper instruction register
  199. (Z=Zbuf,I=interpolation,H=highPalette,L=lowPalette,a=alpha,R=red,G=green,B=blue)
  200.  
  201. In this register-values the circuit distributes the stream into 15bits mode.
  202. Of course (in this case) bitlenght=16, mask=%0111111111111111 to filter the
  203. first unused bit of the word.
  204.  
  205. This example allows a 5+5+5 bits RGB chunky mode, word based in memory (16bit).
  206.  
  207. With the same method and using 3 of the 8 channels, we can have 3 BytePlanes,
  208. all internally stored in the same line-buffer.
  209.  
  210. NOTE: in the usual horizontal-line based cycle, at the start of the line
  211. each channel will have a start position in the destination line-buffer, to
  212. use more than one channel to fill the same line-buffer. Example:
  213.  
  214. BPLDATA0          BPLDATA1          BPLDATA2          BPLDATA3       (channels)
  215. a                 b                 c                 d           (line-buffer)
  216.  
  217. In this case a,b,c,d are the starting points to begin to fill the line-buffer.
  218. There're 2 more registers:
  219. 1) write N cells, skip M cells. (read below about anti-aliasing and VGA modes).
  220. 2) number of cells to process, then halt. (to avoid overwrite).
  221.  
  222.  
  223. Of course, the distributor doesn't change any bit in the line-buffer that is
  224. not explictly selected, thus allowing to load firstly the fields that are
  225. constant (example: Z, I, and/or any other), or allowing multiloading of data.
  226.  
  227.  
  228. Please note that although this stage may seem "complex", it is based on a
  229. one-bit/pixelclock machine, and its excellent performances are the result
  230. of its versatility, not of its complexity.
  231.  
  232.  
  233. Q: So the AGA sprites bandwidth will be wasted?
  234. A: No, because having the line-buffer we can use an extreme overscan (that
  235.    kills AGA sprites) and not waste anything from sprite AGA bandwidth.
  236.  
  237. Q: Can I always have linear chunky mode?
  238. A: Always, just using proper modulo/pointer settings if you want to use more
  239.    than 1 DMA channel. You can have much more though: the AgaEXTENDER registers
  240.    are totally programmable and allow "strange" modes that will impressively
  241.    simplify the CPU work, and thus speed up the Amiga gfx a lot. There's also
  242.    a very powerful as much as simple HiRes-copper.
  243.  
  244. Q: Can I have hardware scroll as in AGA chipset?
  245. A: Yes, always, also in the most strange and complex video modes.
  246.  
  247. Q: The programmable pixelrate and zoom functions make the device more complex?
  248. A: No. They're simply fixedpoint registers added to an internal pointer in
  249.    the 2nd STAGE that reads the line-buffers and sends the data to the screen.
  250.    The clock is fixed, 56Mhz (twice than AGA's clock).
  251.  
  252. Q: Why do we have the bit shifter/delayer in the first part?
  253. A: Because thus we can scroll the playfield also in case we use it for a
  254.    background and we wanna exploit the bandwidth as much as possible, also
  255.    not using byte/word/longword based chunky mode but N bits based.
  256.    This would not be good for drawing with the CPU, but for a fixed backgroud
  257.    it allows 100% use of bandwidth and smooth scroll at the same time, for
  258.    example with a 10bit chunky mode used to display a perfectly hardware
  259.    scrollable 1024 colors dithered background. All with no CPU time waste.
  260.    Ofcourse, multiples of 64bit scroll are made changing AGA bitplane pointers.
  261.    i.e: in case of 8 bit chunky mode, we'll use 0/8/16/24/32/40/48/56 values..
  262.    Furthermore, being the 1st STAGE a one-bit based machine, using a bit
  263.    delayer instead of i.e. a byte-one, we simplify the project and gain from
  264.    versatility at the same time.
  265.  
  266. Q: Why the 2 registers to write/skip consecutive data?
  267. A: To emulate VGA's ModeX for SVGA emulators, to get twice or more apparent
  268.    bandwidth in a playfield using linear interpolation, to make clever tricks
  269.    that speed up gfx routines.
  270.  
  271. Q: Can I have sprites?
  272. A: Although the AgaEXTENDER would be too complex with hardware sprites, due to
  273.    its extreme versatility and clever design, you can have sprites programming
  274.    up to 4 PlayFields with cross-transparency/priority effects (and much more)
  275.    using the built-in HiRes-copper. Thus very complex sprites can be emulated.
  276.  
  277. Q: Planar modes were very useful too, do I lose them?
  278. A: I could say that you can switch back any moment to the Amiga hardware
  279.    (worst case: in the next raster line) and thus have draggable screens
  280.    that can be selected as Aga normal or Aga extended screen modes.
  281.    But, since the AgaEXTENDER has been designed in a clever way to allow
  282.    with or without tricks every screen mode immaginable, studying it you
  283.    will see that it is perfectly possible (with proper register settings)
  284.    to have all configurations of planar modes and/or mixed chunky+planar
  285.    at the same time. There're virtually no limits. With proper registers
  286.    settings you get a screen with 8-bit chunky mode and 8-bit alpha channel,
  287.    that allows "fog/light" effects, transparecy and much more, like a cockpit
  288.    in the bottom of the screen that doesn't need CPU time to be rendered,
  289.    and if you want, this cockpit is in high resolution while the picture
  290.    being draw was 160*128 in memory but looks 320*256 on the screen thanks
  291.    to linear interpolation. The limits are of the coder, not of the
  292.    versatility of the AgaEXTENDER. The device is thought to maximize the use
  293.    of bandwidth and to minimize CPU intervention for video effects, still
  294.    being an external relatively simple device connected to the RGB port.
  295.  
  296. Q: Aren't there "WAIT" and "SKIP" instructions in the HiRes-copper?
  297. A: No, it's a very simple SIC (single instruction computer) and thus doesn't
  298.    need the instruction opcode, but only the 2 operands (adress and data).
  299.    Anyway, a "WAIT" instruction can be emulated using just "NOP" instructions
  300.    (writing to the register address $FF). The lack of WAIT/SKIP instructions
  301.    is not a disadvantage, since the stream of data from Lisa can't be
  302.    stopped anyway. The HiRes-copper can "program" itself, redirecting part or
  303.    the total of its bandwidth for other purposes.
  304.  
  305. Q: Why the AgaEXTENDER speeds up MPEG decompression?
  306. A: First, it allows free YUV conversion (any format).
  307.    Second, it "decompress" in hardware each componant using linear
  308.    interpolation, so we can have i.e. a YUV screen that looks 320*256 1x1
  309.    but is (in memory) 160*128 for the Y component and 80*64 for U,V all
  310.    perfectly interpolated for best gfx quality and minimum CPU usage
  311.    (multiloading data).
  312.    This makes effectively the AGA chipset, with all its bandwidth problems,
  313.    still much faster than SVGA chips. We can still overlay not-interpolated
  314.    gfx for text, at different resolution. The combinations are infinite.
  315.    Moreover, another kind of compression can be made: the I field can be
  316.    used as information channel to display two consecutive pixels (in memory)
  317.    as N interpolated ones in the screen. This allows more video compression
  318.    for free.
  319.  
  320. Q: Why the transparency support?
  321. A: CrossFading (transparency among images) is a good effect for MultiMedia
  322.    applications as Scala, and extremely impressive for videogames. Moreover,
  323.    its clever mechanism allows also priorities among playfields, and the
  324.    HiRes-copper can extend nearly infinitely the possibilities of the
  325.    AgaEXTENDER.
  326.  
  327. Q: Isn't the line-buffer too complex (simultaneous access of upto 8 channels)?
  328. A: With clever engineering it should be possible to simplify it a lot.
  329.    An hint: Each of the 8 DMA channels cell from the distributor can be stored
  330.    temporarily into a 64bit wide register, and once completed it can be stored
  331.    into one 64bit cell of the line-buffer. The triple buffering means 3 times
  332.    more static ram for the line-bufferings but it's simple ram, single access.
  333.    The triple buffering is made just "rotating" (selecting) one of the 3 images
  334.    of the line-buffer for "next line", one for "currently displayed line" and
  335.    one for "previously displayed line" for vertical anti-aliasing.
  336.    Again, with incredibly complex devices such as the ones found into the PSX
  337.    or Saturn, the AgaEXTENDER device, although "apparently complex", should be
  338.    easy to design and implement in a cheap way, being at the end just a simple
  339.    one-bit sequential (and pipelined) device.
  340.  
  341. #######################################
  342.  
  343. Audio Buffers part.
  344.  
  345. There're also four 64bit audio buffers, allowing upto 4 16bit stereo3D channels
  346. (meaning 16 total 16bit voices). To allow a fast transferiment of data during
  347. vertical blank, these buffers must have a lenght of at least i.e.:
  348. (8*44100)/50fps=7056bytes in case of CD stereo quality and 3D stereo sound.
  349.  
  350. The registers work in the same way as for line-buffers, you've only to select
  351. (for each of the 8 channels from AGA bitplanes) the destination as one of the
  352. 4 audio buffers instead of one of the 4 line-buffers.
  353.  
  354. Using the same tricks with AgaEXTENDER registers, you may load mono data, then
  355. a mode will allow mixing them to get the data in both left and right channels,
  356. front and rear, (still having independent volume control for each of them,
  357. and thus allowing real 3D sound with minimum CPU and memory usage) and/or i.e.
  358. you may load 8 bit datas, or 14 consecutive or whatever..
  359.  
  360. Read also the 2nd and 3rd STAGE part (about audio).
  361.  
  362.  
  363. Q: What is 3D sound?
  364. A: Imagine a 3D game like AlienBreed3D, where you are near a monster.
  365.    If you calculate the amplitude of the sound from Front-Left,Front-Right,
  366.    Rear-Left,Rear-Right directions, and set these values into the volume
  367.    registers of the AgaEXTENDER, you'll have the 3D space surroud sensation
  368.    and thus "hear" the direction where the sound is coming from. All with
  369.    minimum CPU and memory usage. 3D sound can be used not only for "space
  370.    sound", but also for excellent stereo surround music/sound effects.
  371.  
  372. Q: How many channels do I get?
  373. A: Maximum is four, but they can be stereo or mono, 3D or 2D, and upto 16 bits
  374.    each.
  375.  
  376. Q: What is the maximum sample rate?
  377. A: It can be *extremely* high, i.e. in only 20 lines during VBL you can get
  378.    768000 bytes/sec, enough for four 3D-stereo-16bit channels at 48000 Hz!
  379.    It could be also possible to implement hardware ADPCM decompression
  380.    to get four times more these performances and save a lot of memory.
  381.  
  382. Q: Do I get variable sampling rate?
  383. A: Yes, it's all independent and asynchronous. Moreover, the 3rd STAGE part
  384.    (read after) can interpolate the audio data to limit aliasing distortion
  385.    in case you use low sampling rates.
  386.  
  387. ###############################################################################
  388.  
  389.  
  390. 2nd STAGE: (Elaboration)
  391.  
  392. VIDEO part:
  393.  
  394. Due to a clever design, the line-buffers can be normal ram, single access.
  395. The horizontal interpolation doesn't need 2 simultaneous accesses, because
  396. it's sequential and thus a register can contain the previous fetched value.
  397.  
  398. The selectable YUV->RGB converter can be placed at the end of the 1st stage or
  399. at the begin of the 2nd. Due to complexity, only one will be used (in the
  400. first of the four line-buffers).
  401.  
  402. For 3D (display priority) effects is used the Z field in the video cells,
  403. and a register enables or disables the use of the Z mode.
  404.  
  405. The Alpha field can be used for cross-transparency effects among the
  406. playfields; if 4 circuits can't be implemented (due to technology problems)
  407. at least 2 circuit will be used: allowing the first and second line-buffer
  408. with this feature. This will allow realtime MultiMedia/Video effects that
  409. no SVGA chip can handle properly.
  410.  
  411. The 16bit palette field can be used partially or totally as one channel (up
  412. to 16 bits: ofcourse only 8 or more will be available).
  413. Loading an immediate value in the RGB field in the same cell, example an
  414. RGB value of 50%,50%,50% (for fog effects) or 0%,0%,0% (for "dark" effect)
  415. will allow CPU-free shading, with no wasted bandwidth. The RGB and palette
  416. outputs will be mixed together (this is selectable using Mode registers) of
  417. an amount proportional to Alpha channel. Thus, in this case, we'll have
  418. 1 word/pixel (8bit for palette and 8bit for Alpha, featuring shading effects)
  419. or 2 byteplanes if necessary.
  420.  
  421. Before every palette table, there's a mask+or register to select a palette
  422. bank to allow fast color switching in OS's AgaEXTENDED draggable screens.
  423.  
  424. The "scaling" and programmable pixel rate are performed simply using a fixed
  425. point register, that will be added every 56Mhz clock cycle.
  426. Thus the AgaEXTENDER has a fixed resolution of 2560 pixels (PAL) that are
  427. subdivided to N (not integer, fixed point) parts to provide any apparent
  428. pixel rate. Ofcourse, using negative step values, we'll have an horizontally
  429. flipped playfield (all with no CPU usage nor bandwidth waste).
  430. This will allow any resolution, always with complete bandwidth usage, and
  431. advanced effects for MultiMedia and games, including some 3D rotation tricks,
  432. limited only by the skill of coders.
  433.  
  434. NOTE: The antialiasing (linear interpolation) part must be discussed with an
  435. engineer, to adapt it to the technology being used. Anyway, to clear doubts
  436. about its complexity, I'll show an example;
  437. To double the apparent resolution, it's sufficient a 3 states machine:
  438. 1) Output Pixel A (the one previously fetched, and stored in a register)
  439. 2) Output Pixel A+B and shift one position to the right (features antialiasing)
  440. 3) Output Pixel B (currently fetched) and swap registers
  441. IMPORTANT: The antialiasing is performed in this stage, not in the fetch one.
  442.  
  443. This is the stage that will be semplified depending on the limits of
  444. technology; it basically "elaborates" and mixes the data fetched and sorted
  445. in the first stage.
  446. There're too many ideas to illustrate all them here: some will be implementable
  447. and some others will not (fully or partially) depending on the technology
  448. being used. Here I would like to have comments from a VLSI/ULSI engineer,
  449. to discuss about limits of the technology that could be used, and drive my
  450. hardware/software imagination to get the best from the technology being used.
  451.  
  452. #######################################
  453.  
  454. AUDIO part:
  455.  
  456. The four 16bit DAC if too complex to be implemented internally, can be extern,
  457. in abbination with a multiplexing device to avoid 64 output lines from the
  458. device. This is not a problem, since audio sampling rates are low enough for
  459. i.e. 16bit multiplexed into one output line (serial stream).
  460. NOTE: four channels rather than two shouldn't be a problem for today's
  461.       technology, since they're handled internally in hardware or microsoftware
  462.       (using a simplified CPU to handle all the internal audio mixing: i.e.
  463.       I recall that the 6502 and Z80 CPU had less than 10,000 transistors,
  464.       extremely less than i.e. about 3,000,000 of 68060 of today).
  465.  
  466. Q: Why, although they're stereo surround and 16bit, only 4 channels nowadays?
  467. A: First, this is only an extension to the AGA chipset, so it should be kept
  468.    simple to keep costs low. This will not limit performances, because the
  469.    design of the AgaEXTENDER hide many possibilities that the best coders will
  470.    discover or invent. Example: we can get a much higher number of voices if
  471.    we use the skip-registers and multiload data, that will be smoothed and
  472.    thus apparently mixed in the 3rd STAGE (this can also be used for echo/
  473.    riverber realtime CPU-free effects). Again, the only limits are of the
  474.    coder, the hardware can allow "unlimited" number of voices using tricks.
  475.  
  476. ###############################################################################
  477.  
  478. 3RD STAGE: (Output)
  479.  
  480. NOTE: the genlock audio bit enables/disables a circuit to pass through the
  481.       AgaEXTENDER to disable the device.
  482.  
  483. Video part:
  484.  
  485. The Vertical Synch from Lisa is unchanged.
  486. The Horizontal Synch is totally independent, to allow scan-doubling for free
  487. (AGA spends 2 times more bandwidth in this case) and independent AGA TOTCLKS
  488. and horizontal scanning frequency, with support for LOL & SHL if necessary.
  489. Also horizonal blanking is completely programmable.
  490. NOTE: the horizontal centering is performed selecting the starting position
  491. in each line-buffer, in the 2nd stage; and the pixelclock (out of the
  492. AgaEXTENDER) is always 56Mhz.
  493.  
  494. The device should provide digital output rather than analog for 2 reasons:
  495. 1) Using an external DAC (such as the VideoHybrid) will semplify the device.
  496. 2) Providing RGB and Alpha digital outputs will be useful in SetTopBoxes, or
  497.    in MultiMedia multi-gfxchip applications. This way the AGA+AgaEXTENDER
  498.    technology could be sold to provide high performances parallel gfxchips,
  499.    with an extremely versatile programming capability, and low costs.
  500.  
  501. #######################################
  502.  
  503. Audio part:
  504.  
  505. [eventually, use multiplexed output to use four external 16bit DAC's].
  506.  
  507. We have 2 input connectors from the Amiga audio, that will be mixed with the 2
  508. front audio output of the AgaEXTENDER. Other 2 connectors will be used for the
  509. 2 rear speakers, or mixed with the front ones using an external switch.
  510.  
  511. ###############################################################################
  512.  
  513. NOTE: since the AgaEXTENDER registers can be written only by the HiRes copper,
  514. every VerticalBlank if the AgaEXTENDER is enabled (through audio genlock bit)
  515. the HiRes copper is automatically started with a standard configuration.
  516.  
  517. This is an example of how the 256 internal registers could be mapped:
  518.  
  519.  
  520. NOTE: EVERY REGISTER IS BYTE SIZE.
  521.  
  522. N.  Name         Function
  523.  
  524. $00=StartPtA_D0  ;15..8 addr. 64bit cell in the line buff to store data
  525. $01=StartPtB_D0  ;7..0 addr. 64bit cell in the line buff to store data
  526. $02=StartRstA_D0 ;15..8 addr. "" cell in the line buff to restart storing data
  527. $03=StartRstB_D0 ;7..0 addr. "" cell in the line buff to restart storing data
  528. $04=FilterS_D0   ;select the byte to start storing in the bitfilter reg. 0..9
  529. $05=FilterD_D0   ;store a byte (with postincrement) in the 80bits bitfilter
  530. $06=SortS_D0     ;select the byte to start storing in the distributor reg. 0..9
  531. $07=SortD_D0     ;store a byte (with postincrement) in the 80bits distributor
  532. $08=Delay_D0     ;bitdelayer: value is from 0 to 63 (multiples of 64 thru AGA)
  533. $09=BitLenght_D0 ;from 1 (planar) to 80 (full ADZIHLaRGB)
  534. $0A=Total_D0     ;number of cells to process before halt (till next HorizSynch)
  535. $0B=Write_D0     ;number of consecutive cells to write into the buffer
  536. $0C=Skip_D0      ;number of consecutive cells to skip of the buffer
  537. $0D=Dest_D0      ;bitflags to select to write or not in each line/audio buffer
  538. $0E=Mode0_D0     ;bitmapped register
  539. $0F=Mode1_D0     ;bitmapped register
  540.  
  541. [...]
  542.  
  543. $70=StartPtA_D7  ;15..8 addr. 64bit cell in the line buff to store data
  544. $71=StartPtB_D7  ;7..0 addr. 64bit cell in the line buff to store data
  545. $72=StartRstA_D7 ;15..8 addr. "" cell in the line buff to restart storing data
  546. $73=StartRstB_D7 ;7..0 addr. "" cell in the line buff to restart storing data
  547. $74=FilterS_D7   ;select the byte to start storing in the bitfilter reg. 0..9
  548. $75=FilterD_D7   ;store a byte (with postincrement) in the 80bits bitfilter
  549. $76=SortS_D7     ;select the byte to start storing in the distributor reg. 0..9
  550. $77=SortD_D7     ;store a byte (with postincrement) in the 80bits distributor
  551. $78=Delay_D7     ;bitdelayer: value is from 0 to 63 (multiples of 64 thru AGA)
  552. $79=BitLenght_D7 ;from 1 (planar) to 80 (full ADZIHLaRGB)
  553. $7A=Total_D7     ;number of cells to process before halt (till next HorizSynch)
  554. $7B=Write_D7     ;number of consecutive cells to write into the buffer
  555. $7C=Skip_D7      ;number of consecutive cells to skip of the buffer
  556. $7D=Dest_D7      ;bitflags to select to write or not in each line/audio buffer
  557. $7E=Mode0_D7     ;bitmapped register
  558. $7F=Mode1_D7     ;bitmapped register
  559.  
  560. $80=AudPerA_A0   ;Period, high byte
  561. $81=AudPerB_A0   ;Period, low byte
  562. $82=AudVolFL_A0  ;0..255, Volume of front left channel
  563. $83=AudVolFR_A0  ;0..255, Volume of front right channel
  564. $84=AudVolRL_A0  ;0..255, Volume of rear left channel
  565. $85=AudVolRR_A0  ;0..255, Volume of rear right channel
  566. $86=AudMode_A0   ;bitflags
  567. $87=AudStep_A0   ;skip N cells (to allow mixing of N voices)
  568. $88=AudMixL_A0   ;mixer/smoother: 0=audio_off 1=normal 2=TwoCells 3=Three...
  569. $89=AudMixR_A0   ;mixer/smoother: 0=audio_off 1=normal 2=TwoCells 3=Three...
  570.  
  571. [...]
  572.  
  573. $B0=AudPerA_A3   ;Period, high byte
  574. $B1=AudPerB_A3   ;Period, low byte
  575. $B2=AudVolFL_A3  ;0..255, Volume of front left channel
  576. $B3=AudVolFR_A3  ;0..255, Volume of front right channel
  577. $B4=AudVolRL_A3  ;0..255, Volume of rear left channel
  578. $B5=AudVolRR_A3  ;0..255, Volume of rear right channel
  579. $B6=AudMode_A3   ;bitflags
  580. $B7=AudStep_A3   ;skip N cells (to allow mixing of N voices)
  581. $B8=AudMixL_A3   ;mixer/smoother: 0=audio_off 1=normal 2=TwoCells 3=Three...
  582. $B9=AudMixR_A3   ;mixer/smoother: 0=audio_off 1=normal 2=TwoCells 3=Three...
  583.  
  584. $C0=PalWriteA    ;store alpha into current palette register
  585. $C1=PalWriteR    ;store red into current palette register
  586. $C2=PalWriteG    ;store green into current palette register
  587. $C3=PalWriteB    ;store blue into current palette register
  588. $C4=PalStartH    ;write here the starting entry, high byte of address
  589. $C5=PalStartL    ;write here the starting entry, low byte of address
  590. $C6=PalAInc      ;increment current palette register by N values
  591.  
  592. [...]
  593.  
  594. control registers
  595.  
  596. [...]
  597.  
  598.  
  599. $FF=No-Op        ;does nothing (still requires a unused data operand).
  600.  
  601. ###############################################################################
  602.  
  603. That's it, if an engineer examine the device and let me know if some
  604. parts can't be implemented and describe the reasons, I can adapt my ideas to
  605. the disponibility of the technology being used, and add new specific ideas.
  606. But all with the imagination of a coder (both of games and OS applications);
  607. with the AgaEXTENDER I am sure I've shown that with a simple and generic
  608. hardware structure the skilled coders can make software miracles.
  609.  
  610. Amiga Technologies have the power to keep low the costs, both for new Amigas
  611. (with the AgaEXTENDER built in) and older Amigas with a AgaEXTENDER to be
  612. plugged in the RGB port, making a fair price (the Graffiti is ridicolously
  613. overpriced).
  614.  
  615. About the problem of ChipMem bandwidth, this can't obviously solved by the
  616. AgaEXTENDER, but since a chip write is parallelized with the execution of
  617. some CPU cached instructions and the AgaEXTENDER allows semplifications
  618. for the programmer's routines like no other gfx board does, I believe at
  619. the end that the ChipMem bandwidth will not be a big problem anymore.
  620. I recall that nowadays also PC software renders graphic into main ram and
  621. then copy them to video memory. But the AgaEXTENDER will be able to use
  622. complex screen modes immediately after the fastest possible CPU longword
  623. copy from fastram.
  624. A dual-port ram for the new AGA Amigas would improve also this point, making
  625. the AgaEXTENDER even more useful, but would still keep compatibility with older
  626. AGA Amigas.
  627.  
  628. The audio part is simply stunning, besides the lack of a DSP to keep costs low.
  629. With simple programming tricks it is possible to get more audio voices, as
  630. well as realtime riverber/echo effects that would extend the space sensation
  631. given by the 3D stereo sound, all saving as much ram for data as possible,
  632. and with minumum CPU usage.
  633.  
  634. I wrote this doc in some days, so if it can become reality, I'll work on it
  635. and improve it as much as the technology that will be used will allow, anyway
  636. I think that the actual technology allows all the features of this project.
  637. I can write a complete emulator of the device (not realtime of course) in
  638. 680x0 optimized code. I will soon post on Aminet explanation diagrams of all
  639. the stages. If the device is too complex, I can semplify it as much as needed
  640. to fit into the technology being used: from the 3+3+2 bit sampler to the
  641. line-buffer, it could be done with TTL circuits, so I believe that also if
  642. a semplification could be needed, it will not need to be big.
  643. I've a lot of ideas to make an agaextender.library for complete OS legal use
  644. of the device, still allowing all the hidden potentials of the device.
  645.  
  646. I *HOPE* Amiga Technologies will consider this project with extreme attention,
  647. the old designers got too many good ideas refused for no good reasons, and the
  648. result is that the Amiga has lost many precious occasions to become great.
  649.  
  650.       *** We don't need expensive hardware, we need clever solutions ***
  651.  
  652. I really believe in this project, it has no comprimizes, only advantages
  653. both technical and commercial. I also believe that this device would attract
  654. thousands enthusiast developers to the Amiga again.
  655.  
  656. If the next Amiga generation will use SVGA GfxChips and PowerPC CPU, then I
  657. believe that professional developers will find much more convenient to learn
  658. to program the same GfxChip (SVGA) and a new CPU (80686 instead of PowerPC)
  659. because 80686 will have a solid market, while PowerAmiga will not have it,
  660. still being both simple PC clones.
  661.  
  662. The Amiga is originality, the Amiga is creativity, the Amiga is clever
  663. solutions, the Amiga can't be just another PC clone with a OS that cannot
  664. compete with the one of the BeBox, nor with all the others stable OS's around.
  665.  
  666. The only wise Amiga future is a powerful and innovative custom chipset, and the
  667. AgaEXTENDER design could be the bridge between these two hardware generations.
  668.  
  669. If the Amiga hardware will be a PC clone, then investing money and development
  670. into a standard 80x86 PC will be a much more wise choice. If the Amiga will be
  671. maybe less powerful than the most modern PC, but will have the clever solutions
  672. that can allow its enthusiast developers to overwork its custom hardware, then
  673. the Amiga will reborn and will have a valid commercial justification of life,
  674. both for hardware and software.
  675.  
  676. I and many other developers renounced to big earnings from the PC market,
  677. accepting the extremely difficult economic condition of the Amiga market, to
  678. support the re-birth of the Amiga, due to the enthusiams we had for the Amiga.
  679. But if AT makes its hardware a PC clone, then we've no reason to support a
  680. PC clone with no market rather than a 80x86 PC with huge and trustable market.
  681.  
  682. I hope that nobody will forget what the Amiga really was, and in which way
  683. it should evolve.
  684.  
  685. Best Regards,
  686.  
  687.  
  688.  
  689. ------------------------------------------------------------------------------
  690. |                                                                            |
  691. |    Fabio "Maverick" Bizzetti - bizzetti@mbox.vol.it - Maverick* at IRC     |
  692. |              The maker of "CyberMan" and "Virtual Karting"                 |
  693. |   working on "Virtual Rally" and "StarFighter", the 3D game that will      |
  694. |                        bring the Amiga to the top                          |
  695. |                                                                            |
  696. ------------------------------------------------------------------------------
  697.  
  698.